From: Carlos Garnacho Date: Tue, 1 Feb 2022 13:31:37 +0000 (+0100) Subject: modalDialog: Ensure to let focus manager handle key events X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~530^2^2~143 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fcf70aa021cc189cb5aaf3f712a2dbb6cf8e5e07;p=gnome-shell.git modalDialog: Ensure to let focus manager handle key events Since the grab no longer lets events bubble up to the stage unstopped, we should be forwarding the key events that bubbled up to the dialog to maybe cycle focus. Fixes focus cycling on keyboard navigation inside dialogs. Part-of: --- diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 259a9c6bb..607000b35 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -101,6 +101,13 @@ var ModalDialog = GObject.registerClass({ this.notify('state'); } + vfunc_key_press_event() { + if (global.focus_manager.navigate_from_event(Clutter.get_current_event())) + return Clutter.EVENT_STOP; + + return Clutter.EVENT_PROPAGATE; + } + clearButtons() { this.dialogLayout.clearButtons(); }